/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:何人亮
 * Date:2024-05-04
 * 14:51
 */
public class Test {
    public static void main(String[] args) {
        int flg=1;
        double sum=0;
        for(int i=1;i<=100;i++){
            sum+=1.0/(i*flg);
            flg=-flg;
        }
        System.out.println(sum);
    }
}
